package com.ebupt.migu.fineoperationactivitymonitor.monitor.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import com.ebupt.migu.fineoperationactivitymonitor.monitor.service.MonitorService;

import lombok.extern.slf4j.Slf4j;


/**
 * @author liuyangyang@e-byte.com
 * @description: TODO
 * @date 2023/11/8 15:47
 */
@Async
@Slf4j
@Component
@EnableScheduling
public class MonitorController {

    @Autowired
    public MonitorService service;

    /**
     * 离线活动状态监控
     */
    @Scheduled(initialDelay = 3000, fixedDelay = 1000 * 60)
    public void offlineActivityMonitor() {
        service.offlineActivityMonitor();
    }

    /**
     * 将类型为iop标签与（咪咕音乐/视频彩铃）标签融合的客群状态，从“已完成”调整至“更新中”，然后进行客群融合。
     */
    @Scheduled(initialDelay = 3000, fixedDelay = 1000 * 10)
    public void iopCustomerStatusCTRL() {
        service.iopCustomerStatusCTRL();
    }

    /**
     * iop标签客群与（咪咕音乐/视频彩铃）标签客群进行融合
     */
    @Scheduled(initialDelay = 3000, fixedDelay = 1000 * 60)
    public void integrate() {
        service.integrate();
    }
}
